﻿

@model WebApp.Models.Department

@{
    ViewBag.Title = "Edit";
}




<div class="container-fluid">
    <!-- Page Heading -->
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                Department
                <small>Edit</small>
            </h1>
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-home"></i>  @Html.ActionLink("Home", "Index", "Home")
                </li>
                 <li>
                    <i class="fa fa-folder-open"></i>  @Html.ActionLink("Departments", "Index", "Departments")
                </li>
                <li class="active">
                    <i class="fa fa-file"></i> Edit
                </li>
            </ol>
        </div>
    </div>
    <!-- /.row -->
     <div class="row">
        <div class="col-lg-12">

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Department</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.Partial("EditForm")
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" class="btn btn-primary" value="Save" />
                <input type="button" class="btn btn-default" data-toggle="modal" data-target="#myModal" value="Delete" />
            </div>
        </div>
    </div>
}
</div>
</div>
 </div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Warning !!</h4>
            </div>
            <div class="modal-body">
                Are you sure you want to delete this item ?
            </div>
            <div class="modal-footer">
                @using (Html.BeginForm("Delete", "Departments", new { id=Model.Id}))
                {
                    @Html.AntiForgeryToken()
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                    <button type="submit" class="btn btn-warning">Delete</button>
                }
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <script type="text/javascript">
	
      </script>

}
